//
//  NormalTableViewCell.m
//  TodatPlay
//
//  Created by dllo on 16/9/5.
//  Copyright © 2016年 DM.C. All rights reserved.
//

#import "NormalTableViewCell.h"
#import "SDAutoLayout.h"

@interface NormalTableViewCell ()
@property (nonatomic, strong) UILabel *label;
@end

@implementation NormalTableViewCell



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self createContents];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createContents];
    }
    return self;
}
- (void)setTextString:(NSString *)textString {
    _textString = textString;
    self.label.text = textString;
}
- (void)createContents {
    self.arcImageView = [UIImageView new];
    [self.contentView addSubview:_arcImageView];
    _arcImageView.image = [UIImage imageNamed:@"icon_tab4_normal"];
    
    self.label = [UILabel new];
    _label.font = [UIFont systemFontOfSize:15];
    
    [self.contentView addSubview:_label];
    
    _arcImageView.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 10)
    .widthIs(20)
    .heightIs(20);
   
    _label.sd_layout
    .leftSpaceToView(_arcImageView, 5)
    .topSpaceToView(self.contentView, 10)
    .rightSpaceToView(self.contentView, 10)
    .autoHeightRatio(0);
    
    [self setupAutoHeightWithBottomView:self.label bottomMargin:10];
    
//    UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
//    [self.contentView addSubview:rightButton];
//    [rightButton setImage:[UIImage imageNamed:@"icon_userCenterNextArrow"] forState:UIControlStateNormal];
//    rightButton.sd_layout
//    .rightSpaceToView(self.contentView, 10)
//    .centerYEqualToView(self.contentView)
//    .widthIs(20)
//    .heightIs(20);
    self.contentView.backgroundColor = [UIColor whiteColor];
    // 在cell右侧添加箭头样式
    self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
